import request from '@/utils/request'

//列表
export function getexamList(data) {
  return request({
    url: 'exam',
    method: 'get',
    params: data
  })
}

//选项
export function getOption() {
  return request({
    url: 'exam/option',
    method: 'get'
  })
}

//新增
export function createRelation(data) {
  return request({
    url: 'exam/createRelation',
    method: 'post',
    data
  })
}
//编辑
export function updateRelation(data) {
  return request({
    url: 'exam/updateRelation',
    method: 'put',
    data
  })
}

// 详情
export function readData(data) {
  return request({
    url: 'exam/read',
    method: 'get',
    params: data,
    headers: {
      'showLoading': false,
    }
  })
}

//修改状态
export function updatestate(data) {
  return request({
    url: 'exam/updatestate',
    method: 'put',
    data
  })
}

// 删除
export function deleteRelation(data) {
  return request({
    url: 'exam/deleteRelation',
    method: 'delete',
    data
  })
}
